import net.sourceforge.pinyin4j.PinyinHelper

class People(var name:String, var pinyin:String, var pinyin0:String) {
    fun input():People{
        println("请输入名字")
        val s=scanner.next()
        var c=""
        var d=""
        for(char in s){
            val a= PinyinHelper.toHanyuPinyinStringArray(char, outputFormat)
            var b=""
            for(i in 0 until a[0].length){
                if(i==0){
                    b=b+a[0][0].uppercaseChar()
                }else{
                    b=b+a[0][i]
                }
            }
            c=c+a[0][0]
            d=d+b
        }
        return People(s,d,c)
    }
}